\(\int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx\) [1206]

   Optimal result
   Rubi [A] (verified)
   Mathematica [C] (verified)
   Maple [F]
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [F(-2)]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 100 \[ \int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx=-\frac {\sqrt {d+e x^2} (a+b \arctan (c x))}{d x}-\frac {b c \text {arctanh}\left (\frac {\sqrt {d+e x^2}}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {b \sqrt {c^2 d-e} \text {arctanh}\left (\frac {c \sqrt {d+e x^2}}{\sqrt {c^2 d-e}}\right )}{d} \]

[Out]

-b*c*arctanh((e*x^2+d)^(1/2)/d^(1/2))/d^(1/2)+b*arctanh(c*(e*x^2+d)^(1/2)/(c^2*d-e)^(1/2))*(c^2*d-e)^(1/2)/d-(
a+b*arctan(c*x))*(e*x^2+d)^(1/2)/d/x

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {270, 5096, 457, 85, 65, 214} \[ \int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx=-\frac {\sqrt {d+e x^2} (a+b \arctan (c x))}{d x}+\frac {b \sqrt {c^2 d-e} \text {arctanh}\left (\frac {c \sqrt {d+e x^2}}{\sqrt {c^2 d-e}}\right )}{d}-\frac {b c \text {arctanh}\left (\frac {\sqrt {d+e x^2}}{\sqrt {d}}\right )}{\sqrt {d}} \]

[In]

Int[(a + b*ArcTan[c*x])/(x^2*Sqrt[d + e*x^2]),x]

[Out]

-((Sqrt[d + e*x^2]*(a + b*ArcTan[c*x]))/(d*x)) - (b*c*ArcTanh[Sqrt[d + e*x^2]/Sqrt[d]])/Sqrt[d] + (b*Sqrt[c^2*
d - e]*ArcTanh[(c*Sqrt[d + e*x^2])/Sqrt[c^2*d - e]])/d

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 85

Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[(b*e - a*f)/(b*c
- a*d), Int[(e + f*x)^(p - 1)/(a + b*x), x], x] - Dist[(d*e - c*f)/(b*c - a*d), Int[(e + f*x)^(p - 1)/(c + d*x
), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && LtQ[0, p, 1]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c*x)^(m + 1)*((a + b*x^n)^(p + 1)/(a*
c*(m + 1))), x] /; FreeQ[{a, b, c, m, n, p}, x] && EqQ[(m + 1)/n + p + 1, 0] && NeQ[m, -1]

Rule 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 5096

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> With[{u =
 IntHide[(f*x)^m*(d + e*x^2)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^
2*x^2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, m, q}, x] && ((IGtQ[q, 0] &&  !(ILtQ[(m - 1)/2, 0] && GtQ[m +
2*q + 3, 0])) || (IGtQ[(m + 1)/2, 0] &&  !(ILtQ[q, 0] && GtQ[m + 2*q + 3, 0])) || (ILtQ[(m + 2*q + 1)/2, 0] &&
  !ILtQ[(m - 1)/2, 0]))

Rubi steps \begin{align*} \text {integral}& = -\frac {\sqrt {d+e x^2} (a+b \arctan (c x))}{d x}-(b c) \int \frac {\sqrt {d+e x^2}}{x \left (-d-c^2 d x^2\right )} \, dx \\ & = -\frac {\sqrt {d+e x^2} (a+b \arctan (c x))}{d x}-\frac {1}{2} (b c) \text {Subst}\left (\int \frac {\sqrt {d+e x}}{x \left (-d-c^2 d x\right )} \, dx,x,x^2\right ) \\ & = -\frac {\sqrt {d+e x^2} (a+b \arctan (c x))}{d x}+\frac {1}{2} (b c) \text {Subst}\left (\int \frac {1}{x \sqrt {d+e x}} \, dx,x,x^2\right )+\frac {1}{2} \left (b c \left (c^2 d-e\right )\right ) \text {Subst}\left (\int \frac {1}{\left (-d-c^2 d x\right ) \sqrt {d+e x}} \, dx,x,x^2\right ) \\ & = -\frac {\sqrt {d+e x^2} (a+b \arctan (c x))}{d x}+\frac {(b c) \text {Subst}\left (\int \frac {1}{-\frac {d}{e}+\frac {x^2}{e}} \, dx,x,\sqrt {d+e x^2}\right )}{e}+\frac {\left (b c \left (c^2 d-e\right )\right ) \text {Subst}\left (\int \frac {1}{-d+\frac {c^2 d^2}{e}-\frac {c^2 d x^2}{e}} \, dx,x,\sqrt {d+e x^2}\right )}{e} \\ & = -\frac {\sqrt {d+e x^2} (a+b \arctan (c x))}{d x}-\frac {b c \text {arctanh}\left (\frac {\sqrt {d+e x^2}}{\sqrt {d}}\right )}{\sqrt {d}}+\frac {b \sqrt {c^2 d-e} \text {arctanh}\left (\frac {c \sqrt {d+e x^2}}{\sqrt {c^2 d-e}}\right )}{d} \\ \end{align*}

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.34 (sec) , antiderivative size = 247, normalized size of antiderivative = 2.47 \[ \int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx=\frac {-2 a \sqrt {d+e x^2}-2 b \sqrt {d+e x^2} \arctan (c x)+2 b c \sqrt {d} x \log (x)-2 b c \sqrt {d} x \log \left (d+\sqrt {d} \sqrt {d+e x^2}\right )+b \sqrt {c^2 d-e} x \log \left (-\frac {4 c d \left (c d-i e x+\sqrt {c^2 d-e} \sqrt {d+e x^2}\right )}{b \left (c^2 d-e\right )^{3/2} (i+c x)}\right )+b \sqrt {c^2 d-e} x \log \left (-\frac {4 c d \left (c d+i e x+\sqrt {c^2 d-e} \sqrt {d+e x^2}\right )}{b \left (c^2 d-e\right )^{3/2} (-i+c x)}\right )}{2 d x} \]

[In]

Integrate[(a + b*ArcTan[c*x])/(x^2*Sqrt[d + e*x^2]),x]

[Out]

(-2*a*Sqrt[d + e*x^2] - 2*b*Sqrt[d + e*x^2]*ArcTan[c*x] + 2*b*c*Sqrt[d]*x*Log[x] - 2*b*c*Sqrt[d]*x*Log[d + Sqr
t[d]*Sqrt[d + e*x^2]] + b*Sqrt[c^2*d - e]*x*Log[(-4*c*d*(c*d - I*e*x + Sqrt[c^2*d - e]*Sqrt[d + e*x^2]))/(b*(c
^2*d - e)^(3/2)*(I + c*x))] + b*Sqrt[c^2*d - e]*x*Log[(-4*c*d*(c*d + I*e*x + Sqrt[c^2*d - e]*Sqrt[d + e*x^2]))
/(b*(c^2*d - e)^(3/2)*(-I + c*x))])/(2*d*x)

Maple [F]

\[\int \frac {a +b \arctan \left (c x \right )}{x^{2} \sqrt {e \,x^{2}+d}}d x\]

[In]

int((a+b*arctan(c*x))/x^2/(e*x^2+d)^(1/2),x)

[Out]

int((a+b*arctan(c*x))/x^2/(e*x^2+d)^(1/2),x)

Fricas [A] (verification not implemented)

none

Time = 0.34 (sec) , antiderivative size = 660, normalized size of antiderivative = 6.60 \[ \int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx=\left [\frac {2 \, b c \sqrt {d} x \log \left (-\frac {e x^{2} - 2 \, \sqrt {e x^{2} + d} \sqrt {d} + 2 \, d}{x^{2}}\right ) + \sqrt {c^{2} d - e} b x \log \left (\frac {c^{4} e^{2} x^{4} + 8 \, c^{4} d^{2} - 8 \, c^{2} d e + 2 \, {\left (4 \, c^{4} d e - 3 \, c^{2} e^{2}\right )} x^{2} + 4 \, {\left (c^{3} e x^{2} + 2 \, c^{3} d - c e\right )} \sqrt {c^{2} d - e} \sqrt {e x^{2} + d} + e^{2}}{c^{4} x^{4} + 2 \, c^{2} x^{2} + 1}\right ) - 4 \, \sqrt {e x^{2} + d} {\left (b \arctan \left (c x\right ) + a\right )}}{4 \, d x}, \frac {b c \sqrt {d} x \log \left (-\frac {e x^{2} - 2 \, \sqrt {e x^{2} + d} \sqrt {d} + 2 \, d}{x^{2}}\right ) + \sqrt {-c^{2} d + e} b x \arctan \left (-\frac {{\left (c^{2} e x^{2} + 2 \, c^{2} d - e\right )} \sqrt {-c^{2} d + e} \sqrt {e x^{2} + d}}{2 \, {\left (c^{3} d^{2} - c d e + {\left (c^{3} d e - c e^{2}\right )} x^{2}\right )}}\right ) - 2 \, \sqrt {e x^{2} + d} {\left (b \arctan \left (c x\right ) + a\right )}}{2 \, d x}, \frac {4 \, b c \sqrt {-d} x \arctan \left (\frac {\sqrt {-d}}{\sqrt {e x^{2} + d}}\right ) + \sqrt {c^{2} d - e} b x \log \left (\frac {c^{4} e^{2} x^{4} + 8 \, c^{4} d^{2} - 8 \, c^{2} d e + 2 \, {\left (4 \, c^{4} d e - 3 \, c^{2} e^{2}\right )} x^{2} + 4 \, {\left (c^{3} e x^{2} + 2 \, c^{3} d - c e\right )} \sqrt {c^{2} d - e} \sqrt {e x^{2} + d} + e^{2}}{c^{4} x^{4} + 2 \, c^{2} x^{2} + 1}\right ) - 4 \, \sqrt {e x^{2} + d} {\left (b \arctan \left (c x\right ) + a\right )}}{4 \, d x}, \frac {2 \, b c \sqrt {-d} x \arctan \left (\frac {\sqrt {-d}}{\sqrt {e x^{2} + d}}\right ) + \sqrt {-c^{2} d + e} b x \arctan \left (-\frac {{\left (c^{2} e x^{2} + 2 \, c^{2} d - e\right )} \sqrt {-c^{2} d + e} \sqrt {e x^{2} + d}}{2 \, {\left (c^{3} d^{2} - c d e + {\left (c^{3} d e - c e^{2}\right )} x^{2}\right )}}\right ) - 2 \, \sqrt {e x^{2} + d} {\left (b \arctan \left (c x\right ) + a\right )}}{2 \, d x}\right ] \]

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x^2+d)^(1/2),x, algorithm="fricas")

[Out]

[1/4*(2*b*c*sqrt(d)*x*log(-(e*x^2 - 2*sqrt(e*x^2 + d)*sqrt(d) + 2*d)/x^2) + sqrt(c^2*d - e)*b*x*log((c^4*e^2*x
^4 + 8*c^4*d^2 - 8*c^2*d*e + 2*(4*c^4*d*e - 3*c^2*e^2)*x^2 + 4*(c^3*e*x^2 + 2*c^3*d - c*e)*sqrt(c^2*d - e)*sqr
t(e*x^2 + d) + e^2)/(c^4*x^4 + 2*c^2*x^2 + 1)) - 4*sqrt(e*x^2 + d)*(b*arctan(c*x) + a))/(d*x), 1/2*(b*c*sqrt(d
)*x*log(-(e*x^2 - 2*sqrt(e*x^2 + d)*sqrt(d) + 2*d)/x^2) + sqrt(-c^2*d + e)*b*x*arctan(-1/2*(c^2*e*x^2 + 2*c^2*
d - e)*sqrt(-c^2*d + e)*sqrt(e*x^2 + d)/(c^3*d^2 - c*d*e + (c^3*d*e - c*e^2)*x^2)) - 2*sqrt(e*x^2 + d)*(b*arct
an(c*x) + a))/(d*x), 1/4*(4*b*c*sqrt(-d)*x*arctan(sqrt(-d)/sqrt(e*x^2 + d)) + sqrt(c^2*d - e)*b*x*log((c^4*e^2
*x^4 + 8*c^4*d^2 - 8*c^2*d*e + 2*(4*c^4*d*e - 3*c^2*e^2)*x^2 + 4*(c^3*e*x^2 + 2*c^3*d - c*e)*sqrt(c^2*d - e)*s
qrt(e*x^2 + d) + e^2)/(c^4*x^4 + 2*c^2*x^2 + 1)) - 4*sqrt(e*x^2 + d)*(b*arctan(c*x) + a))/(d*x), 1/2*(2*b*c*sq
rt(-d)*x*arctan(sqrt(-d)/sqrt(e*x^2 + d)) + sqrt(-c^2*d + e)*b*x*arctan(-1/2*(c^2*e*x^2 + 2*c^2*d - e)*sqrt(-c
^2*d + e)*sqrt(e*x^2 + d)/(c^3*d^2 - c*d*e + (c^3*d*e - c*e^2)*x^2)) - 2*sqrt(e*x^2 + d)*(b*arctan(c*x) + a))/
(d*x)]

Sympy [F]

\[ \int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx=\int \frac {a + b \operatorname {atan}{\left (c x \right )}}{x^{2} \sqrt {d + e x^{2}}}\, dx \]

[In]

integrate((a+b*atan(c*x))/x**2/(e*x**2+d)**(1/2),x)

[Out]

Integral((a + b*atan(c*x))/(x**2*sqrt(d + e*x**2)), x)

Maxima [F(-2)]

Exception generated. \[ \int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x^2+d)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more
details)Is e

Giac [F]

\[ \int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx=\int { \frac {b \arctan \left (c x\right ) + a}{\sqrt {e x^{2} + d} x^{2}} \,d x } \]

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x^2+d)^(1/2),x, algorithm="giac")

[Out]

sage0*x

Mupad [F(-1)]

Timed out. \[ \int \frac {a+b \arctan (c x)}{x^2 \sqrt {d+e x^2}} \, dx=\int \frac {a+b\,\mathrm {atan}\left (c\,x\right )}{x^2\,\sqrt {e\,x^2+d}} \,d x \]

[In]

int((a + b*atan(c*x))/(x^2*(d + e*x^2)^(1/2)),x)

[Out]

int((a + b*atan(c*x))/(x^2*(d + e*x^2)^(1/2)), x)